<template>
  <div class="banner">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
       <van-swipe-item v-for="(img, index) in obj.goodsBanner" :key="index"
        ><img :src="img"
      /></van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import Vue from "vue";
import { Swipe, SwipeItem } from "vant";
Vue.use(Swipe);
Vue.use(SwipeItem);
export default {
  name: "detbanner",
  data() {
    return {
      obj: JSON.parse(this.$route.query.obj),
    };
  },
};
</script>

<style scoped>
.banner {
  width: 100%;
}
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  text-align: center;
}
.van-swipe-item > img {
  width: 100%;
}
</style>